﻿using System.Linq;

namespace Citi.EmailSender.Domain
{
    public partial class OnBehalfOf 
    {
        public OnBehalfOf GetByAddress(string emailAddress)
        {
            return SelectAll<OnBehalfOf>().FirstOrDefault(x => x.FriendlyName == emailAddress || x.Email == emailAddress);
        }
    }
}
